package com.app.ctzoverseas.network.http

import com.android.base_network.RetrofitClient
import com.app.ctzoverseas.network.api.AccountApi

class AccountNetwork {

    private val mAccountApi by lazy { RetrofitClient.getInstance().createApi(AccountApi::class.java) }

    fun getBannerList() = mAccountApi.getBannerList()
    fun getUserInfo() = mAccountApi.getUserInfo()

    companion object {
        @Volatile
        private var netWork: AccountNetwork? = null

        fun getInstance() = netWork ?: synchronized(this) {
            netWork ?: AccountNetwork().also { netWork = it }
        }
    }
}